#ifndef _logutil_h_
#define _logutil_h_
#include <iostream>
#include <fstream>
#include <string>

class LogUtil {

private:
    static LogUtil* logUtil_;
    std::ofstream fout;

    LogUtil();
    LogUtil(LogUtil const&);

public:
    static LogUtil* Instance() {
        if (logUtil_ == NULL) {
            logUtil_ = new LogUtil();
        }
        return logUtil_;
    }
    ~LogUtil();

    void setOutputFile(std::string filename);

    void logWarning(std::string clazz, std::string method, std::string warning);
    void logError(std::string clazz, std::string method, std::string error);
    void logInfo(std::string clazz, std::string method, std::string info);
};

#endif